/*
 * @Author: wangwenshuai 644586996@qq.com
 * @Date: 2022-11-07 10:31:52
 * @LastEditors: wangwenshuai 644586996@qq.com
 * @LastEditTime: 2022-11-09 14:25:51
 * @FilePath: \CarbonPccountingProject\carbon_accounting_project\src\store\getters.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import Vue from 'vue'
import { USER_INFO, ENHANCE_PRE } from "@/store/mutation-types"
const data = {
  stepsCurrent: state => state.data.stepsCurrent,
  cycleId: state => state.data.cycleId,
  fillData: state => state.data.fillData,
  basicInformation: state => state.data.basicInformation,
  result: state => state.data.result,
  deviceType: state => state.data.deviceType,
  slidingWindowDisplay: state => state.data.slidingWindowDisplay,
  loading: state => state.data.loading,
  device: state => state.app.device,
  theme: state => state.app.theme,
  color: state => state.app.color,
  token: state => state.user.token,
  avatar: state => { state.user.avatar = Vue.ls.get(USER_INFO).avatar; return state.user.avatar },
  username: state => state.user.info.username,
  nickname: state => { state.user.info.realname = Vue.ls.get(USER_INFO).realname; return state.user.info.realname },
  welcome: state => state.user.welcome,
  permissionList: state => state.user.permissionList,
  userInfo: state => { state.user.info = Vue.ls.get(USER_INFO); return state.user.info },
  addRouters: state => state.permission.addRouters,
  onlAuthFields: state => { return state.online.authFields },
  enhanceJs: (state) => (code) => {
    state.enhance.enhanceJs[code] = Vue.ls.get(ENHANCE_PRE + code);
    return state.enhance.enhanceJs[code]
  },
  sysSafeMode: state => state.user.sysSafeMode,
  // 二次开发添加
  stepsCurrent: state => state.accounting.stepsCurrent,
  cycleId: state => state.accounting.cycleId,
  fillData: state => state.accounting.fillData,
  // 组织信息
  basicInformation: state => state.accounting.basicInformation,
}
export default data  //显示隐藏header

